
package com.thinkgem.jeesite.common.pojo.auth.data.annotation;

import java.lang.annotation.Documented;
import java.lang.annotation.ElementType;
import java.lang.annotation.Inherited;
import java.lang.annotation.Retention;
import java.lang.annotation.RetentionPolicy;
import java.lang.annotation.Target;

import com.thinkgem.jeesite.common.pojo.auth.data.type.ActType;
import com.thinkgem.jeesite.common.pojo.auth.data.type.OwnType;

/** 
 * entity字段的数据从属注解
 * 标记字段的默认从属和默认数据操作许可
 */
@Retention(RetentionPolicy.RUNTIME)
@Target({ 
    ElementType.METHOD, 
    ElementType.FIELD, 
    ElementType.ANNOTATION_TYPE,
    ElementType.CONSTRUCTOR, 
    ElementType.PARAMETER })
@Documented
@Inherited
public @interface DataRequired {
	OwnType own() default OwnType.all;//数据从属许可
	ActType[] act() default {ActType.view,ActType.add,ActType.mod,ActType.del};//操作许可
}
